import advList from "$v/advList.ejs"

import {
    isLoginRequest,
} from "$a/admin"

export default (async (req, res) => {

    try {
        await isLoginRequest()
    } catch (e) {
        alert("有异常" + e.message)

        // 判断是否权限异常
        if (!e.isLogin) {
            return router.go("/login")
        }
    }

    res.render(advList())
})